<!doctype html>
<html>
<head>
    <meta charset=utf-8>
    <title></title>
    <meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<?=Web_Path?>packs/layui/css/layui.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/font.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/style.css">
    <script src="<?=Web_Path?>packs/js/jquery.min.js"></script>
    <script src="<?=Web_Path?>packs/layui/layui.js"></script>
    <script src="<?=Web_Path?>packs/admin/js/cscms.js"></script>
    <style>
    	li{width: 20%;display: inline-block;float: left;padding: 1%;border:1px solid #e2e2e2;margin: 1%;cursor: pointer;}
    	li img{width: 100%;height: 100px;}
    	li h2{text-align: center;height: 24px;line-height: 24px;overflow: hidden;}
    	li.lisel{border: 1px solid green;}
    </style>
</head>
<body>
	<div style="padding: 2%;">
		<ul>
		<?php
			foreach ($pic_type as $row) {
			    $clas=($sid==$row->id)?' class="lisel"':'';
			    echo '<li'.$clas.' onclick="pic_go('.$row->id.',\''.$row->name.'\');" title="'.$row->name.'"><span><img src="'.piclink('pic',$row->pic).'" /></span><h2>'.$row->name.'</h2></li>';
			}
		?>
		</ul>
	</div>
	<div id="page">
        <div class="data_page"><?=$page_list?></div>
    </div>
	<script type="text/javascript">
		cscms.init();
	</script>
</body>
</html>
<script type="text/javascript"> 
	function pic_go(_sid,_name) { 
		parent.$('#sid').val(_sid);
		parent.$('#name').val(_name);
		var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
		parent.layer.close(index); //再执行关闭 
	}
</script>
</body>
</html>
